package org.millioncall.yueyoga.admin.service;

import java.util.Map;

import org.millioncall.openplatform.common.PaginatedList;
import org.millioncall.yueyoga.admin.model.Consume;
import org.millioncall.yueyoga.admin.model.Consumption;
import org.millioncall.yueyoga.admin.model.Member;
import org.millioncall.yueyoga.admin.model.ProductRemaining;

public interface ConsumptionService {
	
	/**添加消费**/
	public boolean saveConsumption(Consumption consumption);
	/**查询某个消费信息**/
	public Consumption findConsumptionById(Integer id);
	/**条件分页查询**/
	public PaginatedList<Consumption> findConsumptionsInPage(Map<String, Object> map,int start,int limit);
	
	public boolean saveConsume(Consume consume);
	
	/**
	 * 保存消费记录
	 * @param consume 新建消费记录
	 * @param pr 剩余产品，修改会员的产品剩余情况
	 * @param mem 会员，修改会员的状态，变为已开卡
	 * @return 返回保存信息，如果为true，证明保存成功，否则不成功
	 * */
	public String saveConsume(Consume consume, ProductRemaining pr, Member mem);
	
	/**
	 * 查看该会员是否已经消费过了
	 * @param map 参数集合
	 * @return true表示已来过，false表示没有
	 * */
	public boolean isConsumed(Map<String, Object> map);
}
